<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 语句</title>
</head>
<body>
<h2>JavaScript 代码块</h2>
<p>JavaScript 代码块在 { 与 } 之间编写。</p>

<button type="button" onclick="myFunction()">点击我！</button>

<p id="demo1"></p>
<p id="demo2"></p>

<script>
  function myFunction(){
    document.getElementById("demo1").innerHTML="HelloKitty";
    document.getElementById("demo2").innerHTML="How are you?";
  }
</script>
</body>
</html>